package com.biz.primus.management.order.feign;


import com.biz.primus.management.order.degraded.DegradedGeoFeignClient;
import com.biz.primus.model.geo.vo.AreaResponseVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * @author zzy
 * @rema 已派单控制层调用接口
 * @date 2017/11/14/009
 */
@FeignClient(qualifier = "geoFeignClient", name = "service-geo", fallback = DegradedGeoFeignClient.class)
public interface GeoFeignClient {

    /**
     * 获取所有省份
     * @return
     */
    @GetMapping("soa/geoService/findAllProvince")
    List<AreaResponseVo> findAllProvince();

    /**
     * 根据省份查询城市
     * @param provinceId
     * @return
     */
    @GetMapping("soa/geoService/findCitiesByProvinceId")
    List<AreaResponseVo> findCitiesByProvinceId(@RequestParam("provinceId") Long provinceId);

    /**
     * 根据城市查询区/县
     * @param cityId
     * @return
     */
    @GetMapping("soa/geoService/findDistrictsByCityId")
    List<AreaResponseVo> findDistrictsByCityId(@RequestParam("cityId") Long cityId);

}
